<?php
$this->breadcrumbs=array(
	'手机列表'=>array('index'),
);

$this->menu=array(
	array('label'=>'手机列表', 'url'=>array('index')),
	array('label'=>'增加手机', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('mobile-phone-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<?php echo CHtml::link('高级搜索','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php 
 
	$typeMap = array(0=>'无',
					 1=>'直板',
					 2=>'翻盖',
					 3=>'滑盖',
					);

	$this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'mobile-phone-grid',
	'dataProvider'=>$model->search(),
	'filterPosition'=>false,
	'filter'=>$model,
	'columns'=>array(
		'moep_id',
		'moep_name',
		'moep_hot_sale',
		//'moep_type',
		'moep_price',
		'moep_market_price',
		//'moep_vote_num',
		//'moep_vote_score',
		array('name'=>'moep_log',
			  'type'=>'raw',
			  'value'=>'CHtml::image($data->moep_log,"" ,array("width"=>"100px"))',
			),
		/*
		
		'moep_os',
		'moep_screen_size',
		'moep_pix_x',
		'moep_pix_y',
		*/
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
